<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<LINK REL="stylesheet" HREF="../../templates/css/style.css" TYPE="text/css">
<SCRIPT language="javascript" src="../../lib/cate.js"></SCRIPT> 
<SCRIPT src="../../templates/js/myweb.js"></SCRIPT>
<script language="javascript" type="text/javascript">
<!--
   function check_all()
   {
      obj = document.getElementsByName("del_id[]");
	  for( i=0; i<obj.length; i++)
	  {
	  	obj[i].checked = obj[i].checked ? false : true;
	  }     
   }
   function delete_all()
   {
   	  obj = document.getElementsByName("del_id[]");
	  var flag = false;
	  for( i=0; i<obj.length; i++)
	  {
	  	if( obj[i].checked )
		{
		   flag = true;
		   break;
		}
	  }  
	  if( ! flag)
	  {
	    alert("請選擇要刪除大項!");
		return false;
	  }
	  if( window.confirm("此操作將不可以恢復!"))
	  {
	    return true;
	  }else{
	  	return false;
	  }
   }
	function check_form()
	{
      var k = objSorts.childNodes.length;
	  cur_num = k - 1;
      cur_list = document.getElementById("sel_" + cur_num);
	  cur_value = cur_list.value;
	  if (cate[cur_value] || cur_value == "")
	  { 
	    prev_num = cur_num - 1;  //上一个列表框		
	    obj = document.getElementById("sel_" + prev_num);
		if (! obj) cur_value = 0;
		cur_value = obj.value;
	  }	//End if 
	  document.frm_cate.s_cate.value = cur_value;
	  return true;
	} //End fun
   function init_cate()
   {
     {INIT_CATE}
   }
 //-->	   
</script>
<body onLoad="init_cate()">
<table width="98%" border="0" class="table2">
  <tr>
    <td>管理中心 - 出售管理 - 出售房列表 </td>
  </tr>
</table>
<table width="98%" border="0">
  <tr>
    <td><button class="add" onClick="location.href='./news.php?mode=add_news'">添加出售房</button></td>
  </tr>
</table>
<form name="frm_cate" method="post" onSubmit="return check_form()" action="news.php">
<table width="98%" border="0" class="table1" cellpadding="0" cellspacing="0">
<tr>
  <th colspan="2">顯示指定的信息</th>
  </tr>
<tr>
  <td width="11%" nowrap>分類設置：</td>
  <td width="89%" nowrap>{SHOW_CATE}  
      
    <input type="radio" name="featureday" value="1">
    本日精選
    <input type="radio" name="feature" value="1">
    賣屋精選
    <input type="radio" name="saveplan" value="1">
    生活簡約型
    <input type="radio" name="saveplan" value="2">
    精緻高雅型
    <input type="radio" name="saveplan" value="3">
    時尚尊貴型
    <input type="radio" name="recommended" value="1">
    店長推薦

	<select name="del">
    	<option value="">選擇開關</option>
        <option value="0">開</option>
        <option value="1">關</option>
    </select>
	</td>
  <tr>
  <td>關鍵字(房屋編號)：    </td>
  <td><input name="search_key" type="text" id="search_key" value="{SEARCH_KEY}" size="30" />
    <input name="btn_sub2" type="submit" id="btn_sub2" value="查 找" class="bot" />
    <input name="btn_all3" type="submit" id="btn_all3" value="顯示所有" class="bot" /></td>
  </table>
  <input type="hidden" name="s_cate" value="0"/>
</form>
<form name="frm_del"  method="post" action="?mode=del_news" id="frm_del" onSubmit="return delete_all()">
<input type="hidden" name="hid_mode">
<div id="listDiv">
  <table class="table1" border="0" cellpadding="0" cellspacing="0" width="98%">  
    <tr>
      <th  nowrap width="3%"><input type="checkbox" onClick="check_all()" name="checkall" /></th>
      <th  nowrap width="3%">編輯</th>
      <th  nowrap width="8%">房屋編號</th>      
      <th  nowrap width="8%"><STRONG>類型</STRONG></th>     
      <th width="6%"  nowrap>狀態</th>
      <th width="8%"  nowrap>本日精選</th>
      <th width="8%"  nowrap>賣房精選</th>
      <th width="8%"  nowrap>特惠方案</th>
      <th width="8%"  nowrap>店長推薦</th>
      <th width="7%"  nowrap>首頁圖片</th>
      <th width="17%" nowrap>所在分類</th>
      <th width="9%" nowrap>管理員</th>
	  <th  nowrap width="7%">發布時間</th>
    </tr>
    <!-- BEGIN NEWS_LIST -->
    <tr align="center">
      <td><input type="checkbox" name="del_id[]" value="{NEWS_ID}"/></td>
      <td nowrap><a href="{EDIT_URL}"><img src="../../templates/images/editapproveicon.gif" alt="编辑" border="0"></a></td>
      <td nowrap>&nbsp;{num}</td>     
      <td nowrap>{type}</td>     
      <td nowrap>{del}</td>
      <td nowrap>{featureday}</td>
      <td nowrap>{feature}</td>
      <td nowrap>{saveplan}</td>
      <td nowrap>{recommended}</td>
      <td nowrap align='center'>{img}</td>
      <td nowrap>{PAR_TITLE}-{CATE_TITLE}</td>
      <td nowrap>{user_id}</td>
	  <td nowrap>{add_time} </td>
    </tr>
    <!-- END NEWS_LIST -->
	<tr>
      <td colspan="16"><input name="btn_all2" type="button" id="btn_all2" value="全 選" 
	   onClick="javascript:check_all(document.frm_del,true);" class="back"/>　
       <input name="btn_cancel" type="button" id="btn_cancel" value="取 消" 
	   onClick="javascript:check_all(document.frm_del,false);" class="back" />　
	   <input class="del" type="submit" name="delete_all()" value=" 刪 除" /></td>
      </tr>
    <tr>
      <td colspan="16"><div align="center">{PAGE_STRING}</div></td>
    </tr>
  </table>
  </div>
</form>
<script type="text/javascript" src="../../templates/js/tab_js.js"></script>